<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            width: 140px;
            height: 140px;
            background: url(./images/bg.png);
            animation: run1 2s, run2 0.5s steps(12) infinite forwards;
        }
        @keyframes run1 {
            100% {
                transform: translate(600px);
            }
        }
        @keyframes run2 {
            100% {
                background-position: -1680px 0;
            }
        }
    </style>
</head>
<body>
    <div class="box"></div>
</body>
</html>